// The rand7() API is already defined for you.
// int rand7();
// @return a random integer in the range 1 to 7

int rand7(){

}
class Solution {
public:
    int rand10() {
        int ans = rand7() + rand7();
        if(ans > 10){
            return rand10();
        }else{
            return ans;
        }
    }
};